/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package src.client;

import java.util.*;

/**
 *
 * @author Dung Doan
 */
public class Query {
    public Query()
    {
        
    }
    
    public static List<String> getQuery(String query)
    {
        ArrayList<String> list = new ArrayList<String>();
        int beginIndex = 0;
        int endIndex = query.indexOf("\n\n", beginIndex);
        while(endIndex >= beginIndex)
        {
            list.add(query.substring(beginIndex, endIndex));
            beginIndex = endIndex + 2;
            endIndex = query.indexOf("\n\n", beginIndex);
        }
        list.add(query.substring(beginIndex));
        return list;
    }
}
